<?php
declare(strict_types=1);
namespace App\Controller\Notify;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use Service\PayService\Payer\Wxmnapp;
use Service\FaceService\CTIDService;

/**
 * 测试demo
 * @Controller(prefix="/notify/test")
 */
class TestController extends AbstractController
{
    /**
     * 测试微信刷脸支付接口
     * @RequestMapping(path="weixin", methods="post")
     */
    public function weixin(RequestInterface $request,ResponseInterface $response)
    {
        return Wxmnapp::instance()->userAuthInfo($request->input('cid'), $request->input('mn_sid'), $request->input('mnid'),$request->getParsedBody());
    }
    
    /**
     * 测试中盾人脸采集和身份证号码校验功能
     * @RequestMapping(path="CtidAuthCheck", methods="post")
     */
    public function CtidAuthCheck(RequestInterface $request,ResponseInterface $response,CTIDService $CTIDService)
    {
        return $CTIDService->checkFaceAndIdCard($request->getParsedBody());
    }
}